package com.javacommunity.model.dao;

import com.javacommunity.model.entity.Question;
import com.javacommunity.model.entity.User;

public interface QuestionVotationDAO {
	/**
	 *
	 * @param user
	 *            User
	 * @param question
	 *            Question
	 * @return true if user voted current question else return false
	 */
	boolean isVote(User user, Question question);

	/**
	 *
	 * @param user
	 *            User
	 * @param question
	 *            Question
	 * @return true if voted up successful question else return false
	 */
	boolean voteUp(User user, Question question);

	/**
	 *
	 * @param user
	 *            User
	 * @param question
	 *            Question
	 * @return true if voted down successful question else return false
	 */
	boolean voteDown(User user, Question question);

	/**
	 *
	 * @param question
	 * @return vote up - vote down
	 */
	int countVotation(Question question);
}
